<script type="text/javascript" src="view/{$TEMPLATE_NAME_PATH}/js/register.js"></script>

<script type="text/javascript">
{literal}	
	var calendarObjForForm = new DHTMLSuite.calendar({minuteDropDownInterval:10,numberOfRowsInHourDropDown:5,callbackFunctionOnDayClick:'getDateFromCalendar',isDragable:true,displayTimeBar:false}); 
	calendarObjForForm.setCallbackFunctionOnClose('myOtherFunction');
	
	function myOtherFunction()
	{
		
		
	}
	function pickDate(buttonObj,inputObject,myDate)
	{
		calendarObjForForm.setCalendarPositionByHTMLElement(inputObject,0,inputObject.offsetHeight+2);	// Position the calendar right below the form input
		calendarObjForForm.setInitialDateFromInput(inputObject,'dd.mm.yyyy');	// Specify that the calendar should set it's initial date from the value of the input field.
		calendarObjForForm.addHtmlElementReference(myDate,inputObject);	// Adding a reference to this element so that I can pick it up in the getDateFromCalendar below(myInput is a unique key)
		if(calendarObjForForm.isVisible()){
			calendarObjForForm.hide();
		}else{
			calendarObjForForm.resetViewDisplayedMonth();	// This line resets the view back to the inital display, i.e. it displays the inital month and not the month it displayed the last time it was open.
			calendarObjForForm.display();
		}		
	}	
	/* inputArray is an associative array with the properties
	year
	month
	day
	hour
	minute
	calendarRef - Reference to the DHTMLSuite.calendar object.
	*/
	function getDateFromCalendar(inputArray)
	{
		var references = calendarObjForForm.getHtmlElementReferences(); // Get back reference to form field.
		references.customer_dob.value = inputArray.day  + '.' + inputArray.month + '.' + inputArray.year;
		calendarObjForForm.hide();	
		
	}
	{/literal}	
	</script>
<div id="welcomesignin">
	<div id="title_content">
		<div  id="title_txt">
			{TranslateTag}LABEL_REGISTER_FORM{/TranslateTag} 
		</div>
	</div>
	
    <form id="addcustomer" name="addcustomer"  method="POST" onsubmit="return onAddNewUser('addcustomer','?page=customer_registersuccess'); ">
    	<input type="hidden" name="act" value="newcustomer" />
    	<div class="register">
        	<fieldset>
            	<legend>{TranslateTag}LABEL_PERSONAL_INFORMATION{/TranslateTag}</legend>
                <div id="form_register">
                	<div class="row">
                		<div class="txt_register">{TranslateTag}LABEL_GENDER{/TranslateTag}: <font color="#FF0000">*</font></div>
                    	<div class="row left">
                    		<input type="radio" name="customer_gender" onclick="onCheckError(this,'?page=customer_registersuccess','');" value="f" id="customer_gender" required/>
							{TranslateTag}LABEL_FEMALE{/TranslateTag}
							<input type="radio" name="customer_gender" onclick="onCheckError(this,'?page=customer_registersuccess','');" value="m" id="customer_gender" required/>
							{TranslateTag}LABEL_MALE{/TranslateTag}
							
                    	</div>
                        <div id="err_customer_gender" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>	
                    <!--<div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_FIRSTNAME{/TranslateTag}: <font color="#FF0000">*</font> </div>
						<div class="row left">
                    		<input type="text" class="textInput" name="customer_firstname" id="customer_firstname" size="30" maxlength="60" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');" />
                   		</div>
                        <div id="err_customer_firstname" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_LASTNAME{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" class="textInput"  name="customer_lastname" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');" id="customer_lastname" size="30" maxlength="60" required />
                   		</div>
                        <div id="err_customer_lastname" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>-->
                    <!--
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_DATE_OF_BIRTH{/TranslateTag}: <font color="#FF0000"> * </font></div>
						<div class="row left">
                    		<input type="text" name="customer_dob" id="customer_dob" onclick="" value="" size="30" minLength="10" maxlength="10"/>
                            <input type="button" value="" class="dateofbirth" onclick="pickDate(this,document.getElementById('customer_dob'),'customer_dob');">
                   		</div>
                        <div id="err_customer_dob" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    -->
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_COMPANY_NAME{/TranslateTag}:</div>
						<div class="row left">
                    		<input type="text" name="customer_company" id="customer_company"  size="30" minLength="8" maxlength="255" />
                   		</div>
                        <div class="clear"></div>
                	</div>
                </div>
			</fieldset>	
            <br />
			<fieldset>
            	<legend>{TranslateTag}LABEL_BILLING_ADDRESS{/TranslateTag}</legend>
                <div id="form_register">
                	<div class="row">
                		<div class="txt_register">{TranslateTag}LABEL_GENDER{/TranslateTag}: <font color="#FF0000">*</font></div>
                    	<div class="row left">
                    		<input type="radio" name="billing_gender" onclick="onCheckError(this,'?page=customer_registersuccess','');" value="f" id="billing_gender" required/>
							{TranslateTag}LABEL_FEMALE{/TranslateTag}
							<input type="radio" name="billing_gender" onclick="onCheckError(this,'?page=customer_registersuccess','');" value="m" id="billing_gender" required/>
							{TranslateTag}LABEL_MALE{/TranslateTag}
							
                    	</div>
                        <div id="err_billing_gender" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>	
                	<div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_FIRSTNAME{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" class="textInput" name="billing_firstname" id="billing_firstname" value="" size="30" maxlength="60" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');" onkeyup="copytxt(this,'delivery_firstname')"  onkeydown="copytxt(this,'delivery_firstname')"/>
                   		</div>
                        <div id="err_billing_firstname" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_LASTNAME{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" class="textInput" name="billing_lastname" id="billing_lastname" value="" size="30" maxlength="60" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');" onkeyup="copytxt(this,'delivery_lastname')"  onkeydown="copytxt(this,'delivery_lastname')"/>
                   		</div>
                        <div id="err_billing_lastname" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_STREET{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  class="textInput" name="billing_street_address" id="billing_street_address" size="30" maxlength="60" onkeyup="copytxt(this,'delivery_street_address')"  onkeydown="copytxt(this,'delivery_street_address')" />
                   		</div>
                        <div id="err_billing_street_address" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_POSTCODE{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  name="billing_postcode" size="30" id="billing_postcode" mask="numeric" minLength="4" maxlength="10" onkeyup="copytxt(this,'delivery_postcode')"  onkeydown="copytxt(this,'delivery_postcode')" />
                   		</div>
                        <div id="err_billing_postcode" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_CITY{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  class="textInput" name="billing_city" id="billing_city" size="30" maxlength="60" onkeyup="copytxt(this,'delivery_city')"  onkeydown="copytxt(this,'delivery_city')"  />
                   		</div>
                        <div id="err_billing_city" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_STATE{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  class="textInput" name="billing_state" id="billing_state" size="30" maxlength="60" onkeyup="copytxt(this,'delivery_state')"  onkeydown="copytxt(this,'delivery_state')" />
                   		</div>
                        <div id="err_billing_state" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_COUNTRY{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<select style="float:left" onchange="onCheckError(this,'?page=customer_registersuccess','');"  name='billing_country_id' id='billing_country_id' class='postform' required>
                                <option value=''>{TranslateTag}LABEL_PLEASE_CHOOSE{/TranslateTag}</option>
                                {foreach name=country from=$ALLCOUNTRY item=item}
                                    <option id='{$item->country_id}' value='{$item->country_id}'>
                                    {$item->country_name}
                                    </option>
                                {/foreach}
                            </select>
                   		</div>
                        <div id="err_billing_country_id" class="error_alert"  style="margin-left:550px"></div>
                        <div class="clear"></div>
                	</div>
                </div>
			</fieldset>
			<br />
            <fieldset>
            	<legend>{TranslateTag}LABEL_DELIVERY_ADDRESS{/TranslateTag}</legend>
                <div id="form_register">
                	<div class="row">
                		<div class="txt_register">{TranslateTag}LABEL_GENDER{/TranslateTag}: <font color="#FF0000">*</font></div>
                    	<div class="row left">
                    		<input type="radio" name="delivery_gender" onclick="onCheckError(this,'?page=customer_registersuccess','');" value="f" id="delivery_gender" required/>
							{TranslateTag}LABEL_FEMALE{/TranslateTag}
							<input type="radio" name="delivery_gender" onclick="onCheckError(this,'?page=customer_registersuccess','');" value="m" id="delivery_gender" required/>
							{TranslateTag}LABEL_MALE{/TranslateTag}
							
                    	</div>
                        <div id="err_delivery_gender" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>	
                	<div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_FIRSTNAME{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" class="textInput" name="delivery_firstname" id="delivery_firstname" value="" size="30" maxlength="60" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');" />
                   		</div>
                        <div id="err_delivery_firstname" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_LASTNAME{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" class="textInput" name="delivery_lastname" id="delivery_lastname" value="" size="30" maxlength="60" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');" />
                   		</div>
                        <div id="err_delivery_lastname" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_STREET{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  class="textInput" name="delivery_street_address" id="delivery_street_address" size="30" maxlength="60" required />
                   		</div>
                        <div id="err_delivery_street_address" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_POSTCODE{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  name="delivery_postcode" size="30" id="delivery_postcode" mask="numeric" minLength="4" maxlength="10" required />
                   		</div>
                        <div id="err_delivery_postcode" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_CITY{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  class="textInput" name="delivery_city" id="delivery_city" size="30" maxlength="60" required />
                   		</div>
                        <div id="err_delivery_city" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_STATE{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  class="textInput" name="delivery_state" id="delivery_state" size="30" maxlength="60" required />
                   		</div>
                        <div id="err_delivery_state" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_COUNTRY{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<select onchange="onCheckError(this,'?page=customer_registersuccess','');"  name='delivery_country_id' id='delivery_country_id' class='postform' required>
                                <option value=''>{TranslateTag}LABEL_PLEASE_CHOOSE{/TranslateTag}</option>
                                {foreach name=country from=$ALLCOUNTRY item=item}
                                    <option id='{$item->country_id}' value='{$item->country_id}'>
                                    {$item->country_name}
                                    </option>
                                {/foreach}
                            </select>
                   		</div>
                        <div id="err_delivery_country_id" class="error_alert" style="margin-left:460px"></div>
                        <div class="clear"></div>
                	</div>
                </div>
			</fieldset>
            <br />
			
            <fieldset>
            	<legend>{TranslateTag}LABEL_CONTACT_INFORMATION{/TranslateTag}</legend>
                <div id="form_register">
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_TELEPHONE{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  name="customer_telephone" size="30" id="customer_telephone" mask="numeric" minLength="8" maxlength="255" required />
                   		</div>
                        <div id="err_customer_telephone" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
					<div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_CELLPHONE{/TranslateTag}:</div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  name="customer_cellphone" size="30" id="customer_cellphone" mask="numeric" minLength="8" maxlength="255" />
                   		</div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_FAX{/TranslateTag}:</div>
						<div class="row left">
                    		<input type="text" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  name="customer_fax" size="30" mask="numeric" id="customer_fax" minLength="8" maxlength="255" />
                   		</div>
                        <div id="err_customer_fax" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_EMAIL{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    	<input class="textInput" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  type="text" name="customer_email" id="customer_email" size="30" mask="email" maxlength="255" required />
                   		</div>
                        <div id="err_customer_email" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                </div>
			</fieldset>
            <br />
            <fieldset>
            	<legend>{TranslateTag}LABEL_PASSWORD{/TranslateTag}</legend>
                <div id="form_register">
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_PASSWORD{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    		<input type="password" onblur="onCheckError(this,'?{$smarty.server.QUERY_STRING}','');"  class="textInput" size="30" minLength="6" name="customer_password" id="customer_password" required />
                   		</div>
                        <div id="err_customer_password" class="error_alert"></div>
                        <div class="clear"></div>
                	</div>
                    <div class="row">
                    	<div class="txt_register">{TranslateTag}LABEL_PASSWORD_CONFIRMATION{/TranslateTag}: <font color="#FF0000">*</font></div>
						<div class="row left">
                    	<input type="password" onblur="onCheckError(this,'?page=customer_registersuccess','customer_password');"  class="textInput" size="30" minLength="6" name="customer_confirmpassword" id="customer_confirmpassword" required />
                   		</div>
                        <div id="err_customer_confirmpassword" class="error_alert"></div>
                        <div class="clear"></div>

                	</div>
                </div>
			</fieldset>
            <!--<div id="newsletter">
                <div class="left_news">{TranslateTag}LABEL_NEWSLETTER{/TranslateTag}:</div>
                <div class="right">
                    <input name="customer_newsletter" id="customer_newsletter" type="checkbox" value="1"/>
                </div>    
            </div>-->
        </div>
        <p align="right">
					<!--<input type="reset" class="btn_reset" value="" />-->        
					<input type="submit" id="submit" class="btn_register" value=""/>
		</p>
  </form>
</div>
